
***Table 1

xi: reg3 (v2csreprss military communist power_dist log_pop2 mean_protest anti_system v2x_jucon i.nation) ///
(torture military communist mean_protest v2x_jucon corruption log_duration_nr i.nation) /// 
(killings military communist mean_protest v2x_jucon corruption log_duration_nr i.nation) ///
(v2clfmove military communist e_migdppcln log_pop2 growth i.nation) if e_p_polity!=-77 & e_p_polity!=-66 & gwf_nonautocracy=="NA" | ///
gwf_nonautocracy=="democracy", endog(log_duration_nr anti_system mean_protest growth v2x_jucon corruption) exog(i.year)

outreg using 3sls, replace stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

reg3 (v2csreprss military communist power_dist log_pop2 mean_protest anti_system lji i.nation) ///
(torture military communist mean_protest lji corruption log_duration_nr i.nation) /// 
(killings military communist mean_protest lji corruption log_duration_nr i.nation) ///
(v2clfmove military communist e_migdppcln log_pop2 growth i.nation) if e_p_polity!=-77 & e_p_polity!=-66 & gwf_nonautocracy=="NA" | ///
gwf_nonautocracy=="democracy", endog(log_duration_nr anti_system mean_protest growth lji corruption) exog(i.year)

outreg using 3sls, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

reg3 (v2csreprss _military2 communist power_dist log_pop2 mean_protest anti_system v2x_jucon i.nation) ///
(torture _military2 communist mean_protest v2x_jucon corruption regime_duration i.nation) /// 
(killings _military2 communist mean_protest v2x_jucon corruption regime_duration i.nation) ///
(v2clfmove _military2 communist e_migdppcln log_pop2 growth i.nation) if e_p_polity!=-77 & e_p_polity!=-66 & gwf_nonautocracy=="NA" | ///
gwf_nonautocracy=="democracy", endog(regime_duration anti_system mean_protest growth v2x_jucon corruption) exog(i.year)

outreg using 3sls, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

margins, dydx(_military)

reg3 (v2csreprss _military2 communist power_dist log_pop2 mean_protest anti_system lji i.nation) ///
(torture _military2 communist mean_protest lji corruption regime_duration i.nation) /// 
(killings _military2 communist mean_protest lji corruption regime_duration i.nation) ///
(v2clfmove _military2 communist e_migdppcln log_pop2 growth i.nation) if e_p_polity!=-77 & e_p_polity!=-66 & gwf_nonautocracy=="NA" | ///
gwf_nonautocracy=="democracy", endog(regime_duration anti_system mean_protest growth lji corruption) exog(i.year)

outreg using 3sls, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

***Appendix C

gsem (v2x_freexp <- military communist e_migdppcln v2xlg_legcon v2x_veracc power_dist, family(beta)) ///
(v2csreprss_ord <- military communist power_dist log_pop2 mean_protest anti_system v2x_jucon, ologit) ///
(v2cltort_ord <- military communist mean_protest v2x_jucon corruption log_duration_nr, ologit) /// 
(v2clkill_ord <- military communist mean_protest v2x_jucon corruption log_duration_nr, ologit) ///
(v2clfmove_ord <- military communist e_migdppcln log_pop2 growth, ologit) if demo_nr=="0", vce(cluster gwf_casename)

outreg using 4revised, replace stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

gsem (v2x_freexp <- military communist e_migdppcln v2xlg_legcon v2x_veracc power_dist, family(beta)) ///
(v2csreprss_ord <- military communist power_dist log_pop2 demons riots guerrilla revolutions anti_system v2x_jucon, ologit) ///
(v2cltort_ord <- military communist demons riots guerrilla revolutions v2x_jucon corruption log_duration_nr, ologit) /// 
(v2clkill_ord <- military communist demons riots guerrilla revolutions v2x_jucon corruption log_duration_nr, ologit) ///
(v2clfmove_ord <- military communist e_migdppcln log_pop2 growth, ologit) if demo_nr=="0", vce(cluster gwf_casename)

outreg using 4revised, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

gsem (v2x_freexp <- military communist e_migdppcln v2xlg_legcon v2x_veracc power_dist, family (beta)) ///
(v2csreprss_ord <- military communist power_dist log_pop2 mean_protest anti_system lji, ologit ) ///
(v2cltort_ord <- military communist mean_protest lji corruption log_duration_nr, ologit) /// 
(v2clkill_ord <- military communist mean_protest lji corruption log_duration_nr, ologit) ///
(v2clfmove_ord <- military communist e_migdppcln log_pop2 growth, ologit) if demo_nr=="0", vce(cluster gwf_casename)

outreg using 4revised, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

gsem (v2x_freexp <- military communist e_migdppcln v2xlg_legcon v2x_veracc power_dist, family (beta)) ///
(v2csreprss_ord <- military communist power_dist log_pop2 demons riots guerrilla revolutions anti_system lji, ologit ) ///
(v2cltort_ord <- military communist demons riots guerrilla revolutions lji corruption log_duration_nr, ologit) /// 
(v2clkill_ord <- military communist demons riots guerrilla revolutions lji corruption log_duration_nr, ologit) ///
(v2clfmove_ord <- military communist e_migdppcln log_pop2 growth, ologit) if demo_nr=="0", vce(cluster gwf_casename)

outreg using 4revised, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

***ECMs in the paper*** with Magaloni variable  

xtpcse d.torture d.military d.l.communist d.mean_protest d.l.log_pop2 d.l.e_migdppcln d.anti_system ///
	   l.torture l.military l2.communist l.mean_protest l2.log_pop2 l2.e_migdppcln l.anti_system if ///
	   e_p_polity!=-77 & e_p_polity!=-66, pairwise
	   
sum d.torture if e(sample)
		
outreg using 1ECM, replace stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

xtpcse d.torture d.military d.l.communist d.demons d.riots d.guerrilla d.revolutions d.l.log_pop2 d.l.e_migdppcln d.anti_system  ///
	   l.torture l.military l2.communist l.demons l.riots l.guerrilla l.revolutions l2.log_pop2 l2.e_migdppcln l.anti_system if ///
	   e_p_polity!=-77 & e_p_polity!=-66, pairwise
		
outreg using 1ECM, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)
		

xtpcse d.killings d.military d.l.communist d.mean_protest d.l.log_pop2 d.l.e_migdppcln d.anti_system ///
	   l.killings l.military l2.communist l.mean_protest l2.log_pop2 l2.e_migdppcln l.anti_system if ///
	   e_p_polity!=-77 & e_p_polity!=-66, pairwise
		
outreg using 1ECM, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)
		
xtpcse d.killings d.military d.l.communist d.demons d.riots d.guerrilla d.revolutions d.l.log_pop2 d.l.e_migdppcln d.anti_system ///
	   l.killings l.military l2.communist l.demons l.riots l.guerrilla l.revolutions l2.log_pop2 l2.e_migdppcln l.anti_system if ///
	   e_p_polity!=-77 & e_p_polity!=-66, pairwise
		
outreg using 1ECM, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)


***robustness check with Kim&Kroeger

xtpcse d.torture d._military2 d.l.communist d.mean_protest d.l.log_pop2 d.l.e_migdppcln d.anti_system ///
	   l.torture l._military2 l2.communist l.mean_protest l2.log_pop2 l2.e_migdppcln l.anti_system  ///
	   if e_p_polity!=-77 & e_p_polity!=-66 & gwf_nonautocracy=="NA" | ///
gwf_nonautocracy=="democracy", pairwise
		
outreg using 2ECM, replace stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)

xtpcse d.torture d._military2 d.l.communist d.demons d.riots d.guerrilla d.revolutions d.l.log_pop2 d.l.e_migdppcln d.anti_system  ///
	   l.torture l._military2 l2.communist l.demons l.riots l.guerrilla l.revolutions l2.log_pop2 l2.e_migdppcln l.anti_system  ///
	   if e_p_polity!=-77 & e_p_polity!=-66 & gwf_nonautocracy=="NA" | ///
gwf_nonautocracy=="democracy", pairwise
		
outreg using 2ECM, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)
		

xtpcse d.killings d._military2 d.l.communist d.mean_protest d.l.log_pop2 d.l.e_migdppcln d.anti_system ///
	   l.killings l._military2 l2.communist l.mean_protest l2.log_pop2 l2.e_migdppcln l.anti_system  ///
	   if e_p_polity!=-77 & e_p_polity!=-66 & gwf_nonautocracy=="NA" | ///
gwf_nonautocracy=="democracy", pairwise
		
outreg using 2ECM, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)
		
xtpcse d.killings d._military2 d.l.communist d.demons d.riots d.guerrilla d.revolutions d.l.log_pop2 d.l.e_migdppcln d.anti_system ///
	   l.killings l._military2 l2.communist l.demons l.riots l.guerrilla l.revolutions l2.log_pop2 l2.e_migdppcln l.anti_system ///
	   if e_p_polity!=-77 & e_p_polity!=-66 & gwf_nonautocracy=="NA" | ///
gwf_nonautocracy=="democracy", pairwise
		
outreg using 2ECM, merge stats(b) starloc(1) starlevels(10 5 1) sigsymbols(*,**,***)


